<?php
/**
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       Cake.Console.Templates.default.views
 * @since         CakePHP(tm) v 1.2.0.5234
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
?>
<article class="module width_full">
<?php echo "<?php echo \$this->Form->create('{$modelClass}'); ?>\n"; ?>
	<header><h3><?php printf("<?php echo __('%s %s'); ?>", Inflector::humanize($action), $singularHumanName); ?></h3></header>
	<div class="module_content">
<?php
		echo "\t<?php\n";
		foreach ($fields as $field) {
			if (strpos($action, 'add') !== false && $field == $primaryKey) {
				continue;
			} elseif (!in_array($field, array('created', 'modified', 'updated'))) {
				echo "\t\techo '<fieldset>';\n";
				echo "\t\techo \$this->Form->input('{$field}', array('div' => false));\n";
				echo "\t\techo '</fieldset>';\n";
			}
		}
		if (!empty($associations['hasAndBelongsToMany'])) {
			foreach ($associations['hasAndBelongsToMany'] as $assocName => $assocData) {
				echo "\t\techo '<fieldset>';\n";
				echo "\t\techo \$this->Form->input('{$assocName}', array('div' => false));\n";
				echo "\t\techo '</fieldset>';\n";
			}
		}
		echo "\t?>\n";
?>
	<div class="clear"></div>
	</div>
	<footer>
		<div class="submit_link">
			<?php
	echo "<?php echo \$this->Form->end(__('Submit')); ?>\n";
?>
		</div>
	</footer>
</article><!-- end of post new article -->
